<?php /*a:2:{s:99:"D:\Other\phpstudy_pro\WWW\zhongchuang-yixing\public/themes/admin_simpleboot3/admin\datas\index.html";i:1709833270;s:95:"D:\Other\phpstudy_pro\WWW\zhongchuang-yixing\public/themes/admin_simpleboot3/public\header.html";i:1709833882;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <!-- Set render engine for 360 browser -->
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- HTML5 shim for IE8 support of HTML5 elements -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <![endif]-->


    <link href="/themes/admin_simpleboot3/public/assets/themes/<?php echo cmf_get_admin_style(); ?>/bootstrap.min.css" rel="stylesheet">
    <link href="/themes/admin_simpleboot3/public/assets/simpleboot3/css/simplebootadmin.css" rel="stylesheet">
    <link href="/static/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
    <!--[if lt IE 9]>
    <script src="https://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <style>
        form .input-order {
            margin-bottom: 0px;
            padding: 0 2px;
            width: 42px;
            font-size: 12px;
        }

        form .input-order:focus {
            outline: none;
        }

        .table-actions {
            margin-top: 5px;
            margin-bottom: 5px;
            padding: 0px;
        }

        .table-list {
            margin-bottom: 0px;
        }

        .form-required {
            color: red;
        }
    </style>
    <script type="text/javascript">
        //全局变量
        var GV = {
            ROOT: "/",
            WEB_ROOT: "/",
            JS_ROOT: "static/js/",
            APP: '<?php echo app('request')->module(); ?>'/*当前应用名*/
        };
    </script>
    <script src="/themes/admin_simpleboot3/public/assets/js/jquery-1.10.2.min.js"></script>
    <script src="/themes/admin_simpleboot3/public/assets/layui/layui.js"></script>
    <link  href="/themes/admin_simpleboot3/public/assets/layui/css/layui.css" rel="stylesheet">
    <script src="/static/js/echarts.min.js"></script>

    <script src="/static/js/wind.js"></script>
    <script src="/themes/admin_simpleboot3/public/assets/js/bootstrap.min.js"></script>
    <script>
        Wind.css('artDialog');
        Wind.css('layer');
        $(function () {
            $("[data-toggle='tooltip']").tooltip({
                container:'body',
                html:true,
            });
            $("li.dropdown").hover(function () {
                $(this).addClass("open");
            }, function () {
                $(this).removeClass("open");
            });
        });
    </script>
    <?php if(APP_DEBUG): ?>
        <style>
            #think_page_trace_open {
                z-index: 9999;
            }
        </style>
    <?php endif; ?>
</head>
<body>
<div class="wrap js-check-wrap">


    <form class="well form-inline margin-top-20" method="get" >

        项目:
        <select class="form-control" name="gid" id="gid" style="width: 140px;">
            <option value=''>全部</option>

            <?php if(is_array($goods) || $goods instanceof \think\Collection || $goods instanceof \think\Paginator): $i = 0; $__LIST__ = $goods;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$good): $mod = ($i % 2 );++$i;?>

                <option value="<?php echo $good['id']; ?>"><?php echo $good['title']; ?></option>
            <?php endforeach; endif; else: echo "" ;endif; ?>



        </select> &nbsp;&nbsp;


        入库开始时间: <input class="js-date form-control"
               type="text"
               id="starttime"
               placeholder="2024-01-01"
               name="starttime">

        入库结束时间: <input class="js-date form-control"
                        type="text"
                        id="endtime"
                        placeholder="2024-11-31"
                        name="endtime">

        <input type="button" id="selectval" class="btn btn-primary" value="搜索" />


    </form>



    <table class="table table-hover table-bordered">

        <table class="layui-hide" id="test" lay-filter="test"></table>

        <script type="text/html" id="toolbarDemo">
            <div class="layui-btn-container">
                <!--                <button class="layui-btn layui-btn-sm" lay-event="getCheckData">获取选中行数据</button>-->
                <!--                <button class="layui-btn layui-btn-sm" lay-event="getCheckLength">获取选中数目</button>-->
                <!--                <button class="layui-btn layui-btn-sm" lay-event="isAll">验证是否全选</button>-->
            </div>
        </script>
        <script type="text/html" id="barDemo">
            <a class="layui-btn layui-btn-success layui-btn-xs" lay-event="edit">修改</a>
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
        </script>

        <!--    自定义    -->
        <script type="text/html" id="titleTpl">
            {{d.status}}
        </script>
        <script type="text/html" id="titleTpl1">
            {{d.zsname}}-{{d.zfb}}
        </script>

        <script type="text/html" id="titleTpl2">
            {{d.money}}/{{d.backmoney}}
        </script>

        <script type="text/html" id="titleTpl3">
            {{d.name}}-{{d.kdnum}}
        </script>

        <script type="text/html" id="titleTpl4">
            {{#  if(d.zj == 1){ }}
            快递单:{{d.kdnumb}} {{d.addressb}}
            {{#  } else { }}
            不转寄
            {{#  } }}
        </script>

        <script type="text/html" id="titleTpl5">
            {{#  if(d.zf == 1){ }}
            公司代付
            {{#  } else { }}
            自付
            {{#  } }}
        </script>


        <script>

            layui.use('table', function(){
                var table = layui.table;
                var curl="<?php echo url('datas/orderlists'); ?>";

                var tableIns =table.render({
                    elem: '#test' ,
                    url:curl,
                    method: 'post',
                    toolbar: '#toolbarDemo',
                    limits:[10,100,500,999],
                    title: '订单表',
                    cols: [[

                        {field:'id', title:'ID', width:80}

                        ,{field:'pname', title:'负责人'}
                        ,{field:'goods', title:'商品名'}
                        ,{field:'status', title:'状态', templet: '#titleTpl'}
                        ,{field:'zsname', title:'真实信息', templet: '#titleTpl1'}
                        ,{field:'money', title:'金额/应结', templet: '#titleTpl2'}
                        ,{field:'name', title:'收件人-快递单-下单地址', templet: '#titleTpl3'}
                        ,{field:'address', title:'下单地址'}
                        ,{field:'codes', title:'取件码'}
                        ,{field:'kdnumb', title:'转寄', templet: '#titleTpl4'}
                        ,{field:'zf', title:'支付方式', templet: '#titleTpl5'}

                        ,{field:'more', title:'注意事项'}
                        ,{field:'desc', title:'说明'}
                        ,{field:'chuorder', title:'出库单号'}
                        ,{field:'chuadd', title:'出库地点'}
                        ,{field:'chukutime', title:'出库时间'}
                        ,{fixed: 'right', title:'操作', toolbar: '#barDemo', width:120}
                    ]]
                    ,page: true
                });


                $("#selectval").click(function (){

                    var gid=$("#gid").val();
                    var starttime=$("#starttime").val();
                    var endtime=$("#endtime").val();


                    tableIns.reload({
                        where: { gid:gid,endtime:endtime,starttime:starttime} ,
                        page: {curr:1}
                    });

                })

                //表格工具行事件
                table.on('tool(test)', function(obj){
                    var data = obj.data;
                    //console.log(obj)
                    if(obj.event === 'del'){

                        var curl="<?php echo url('order/orderdelete'); ?>";

                        layer.confirm('真的删除行么', function(index){
                            $.ajax({
                                url: curl,
                                data:{'id':data.id},
                                type:'post',
                                success:function (ret){
                                    obj.del();
                                    layer.close(index);
                                }
                            })


                        });
                    } else if(obj.event === 'edit'){

                        var curl="<?php echo url('order/editalls'); ?>?id="+data.id;

                        layer.open({
                            type: 2,
                            area: ['700px', '500px'],
                            content: curl,
                            success:function (){
                                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                                parent.layer.close(index); //再执行关闭
                            }
                        });
                    }else if(obj.event === 'list'){

                        var curl="<?php echo url('order/seeorder'); ?>?id="+data.id;

                        layer.open({
                            type: 2,
                            area: ['1200px', '800px'],
                            content: curl,
                            success:function (){
                                var index = parent.layer.getFrameIndex(window.name); //先得到当前iframe层的索引
                                parent.layer.close(index); //再执行关闭
                            }
                        });
                    }
                });


            });
        </script>


    </table>

</div>
<script src="/static/js/admin.js"></script>
</body>
</html>
